<template>
  <div class="upload-container">
    <el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click="show=true">上传</el-button>
<!--    <el-dialog-->
<!--        :visible.sync="show"-->
<!--        title="上传文件"-->
<!--        :append-to-body="true"-->
<!--        destroy-on-close-->
<!--        :close-on-click-modal="false"-->
<!--        width="1000px">-->
<!--      <UploadFile-->
<!--          v-if="show"-->
<!--          :multiple="true"-->
<!--          @getFile="handleChoose"-->
<!--          ref="uploads"-->
<!--      />-->
<!--    </el-dialog>-->
  </div>
</template>

<script>
import UploadFile from "@/components/File/UploadFile.vue";

export default {
  name: 'EditorSlideUpload',
  components: {UploadFile},
  props: {
    color: {
      type: String,
      default: '#1890ff'
    }
  },
  data() {
    return {
      show: false
    }
  },
  methods: {
     handleChoose(arr){
       this.show=false;
       this.$emit('successCBK', arr)
     }
  }
}
</script>

<style lang="scss" scoped>
.editor-slide-upload {
  margin-bottom: 20px;
  ::v-deep .el-upload--picture-card {
    width: 100%;
  }
}
</style>
